package com.tengfei.gulishop.member;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 远程调用其它服务过程
 * 1. 引入open-feign
 * 2. 编写接口，告知springcloud这个接口需要远程调用，
 * 接口写上注解->示例：@FeignClient("gulishop-coupon")，接口内为远程服务名称
 * 3. 接口内写全远程远程方法的抽象方法形式，补全请求路径
 * 4. @EnableFeignClients->启动远程调用客户端
 */

@EnableFeignClients(basePackages = "com.tengfei.gulishop.member.feign")
@EnableDiscoveryClient
@MapperScan("com.tengfei.gulishop.member.dao")
@SpringBootApplication
public class GulishopMemberApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulishopMemberApplication.class, args);
    }

}
